------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\rhhaefen\Dropbox\EPA_WQ_Grant_Survey_Files\Final_Data_Public\log\1-impute.log
  log type:  text
 opened on:  23 Nov 2021, 16:54:48

. log off ;
      name:  <unnamed>
       log:  C:\Users\rhhaefen\Dropbox\EPA_WQ_Grant_Survey_Files\Final_Data_Public\log\1-impute.log
  log type:  text
 paused on:  23 Nov 2021, 16:54:48
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\rhhaefen\Dropbox\EPA_WQ_Grant_Survey_Files\Final_Data_Public\log\1-impute.log
  log type:  text
resumed on:  23 Nov 2021, 16:54:48

. foreach y of varlist gender age fulltime retired own_home water_bill hs_diploma college adults kids { ;
  2.    imp1 `y' ;
  3. } ;

VARIABLE: gender
County      % Missing       Mean
--------------------------------
Guilford    6.0493827    .41918528
Mecklenburg 5.9743954    .49319213
Wake        6.5130261    .50803859

VARIABLE: age
County      % Missing       Mean
--------------------------------
Guilford    6.7901235    52.376159
Mecklenburg 7.1123755    50.531394
Wake        7.7154309    50.574376

VARIABLE: fulltime
County      % Missing       Mean
--------------------------------
Guilford    5.8024691    .52555701
Mecklenburg 5.6899004    .56711916
Wake        6.4128257    .59421842

VARIABLE: retired
County      % Missing       Mean
--------------------------------
Guilford    5.8024691    .27129751
Mecklenburg 5.6899004    .21719457
Wake        6.4128257    .22912206

VARIABLE: own_home
County      % Missing       Mean
--------------------------------
Guilford    5.9259259    .74540682
Mecklenburg 5.8321479    .72356495
Wake        6.3126253    .77540107

VARIABLE: water_bill
County      % Missing       Mean
--------------------------------
Guilford    1.3580247    .75219024
Mecklenburg 3.5561878    .9100295
Wake        1.2024048    .89553753

VARIABLE: hs_diploma
County      % Missing       Mean
--------------------------------
Guilford    5.9259259    .98293963
Mecklenburg 5.8321479    .98791541
Wake        6.2124248    .99786325

VARIABLE: college
County      % Missing       Mean
--------------------------------
Guilford    5.9259259    .63779528
Mecklenburg 5.8321479    .75226586
Wake        6.2124248    .77350427

VARIABLE: adults
County      % Missing       Mean
--------------------------------
Guilford    6.2962963    2.0013175
Mecklenburg 6.401138    1.9984802
Wake        6.9138277    2

VARIABLE: kids
County      % Missing       Mean
--------------------------------
Guilford    6.4197531    .53166227
Mecklenburg 6.685633    .58384146
Wake        6.9138277    .6350915

. foreach y of varlist native asian black white hawaii other hisp_latino { ;
  2.    imp1 `y' ;
  3. } ;

VARIABLE: native
County      % Missing       Mean
--------------------------------
Guilford    6.2962963    .01844532
Mecklenburg 5.2631579    .01201201
Wake        6.8136273    .01612903

VARIABLE: asian
County      % Missing       Mean
--------------------------------
Guilford    6.2962963    .03030303
Mecklenburg 5.2631579    .05105105
Wake        6.8136273    .06451613

VARIABLE: black
County      % Missing       Mean
--------------------------------
Guilford    6.2962963    .18708827
Mecklenburg 5.2631579    .17267267
Wake        6.8136273    .12258065

VARIABLE: white
County      % Missing       Mean
--------------------------------
Guilford    6.2962963    .71014493
Mecklenburg 5.2631579    .7012012
Wake        6.7134269    .7905478

VARIABLE: hawaii
County      % Missing       Mean
--------------------------------
Guilford    6.2962963    0
Mecklenburg 5.2631579    0
Wake        6.8136273    0

VARIABLE: other
County      % Missing       Mean
--------------------------------
Guilford    6.2962963    .07509881
Mecklenburg 5.2631579    .07357357
Wake        6.8136273    .05913978

VARIABLE: hisp_latino
County      % Missing       Mean
--------------------------------
Guilford    6.5432099    .04755614
Mecklenburg 6.2588905    .05918058
Wake        7.2144289    .0475162

. sum income ;

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      income |      2,511    88395.95    68267.97         -1     225000

. gen inc_reported = (income~=-1) ;

. label var inc_reported "=1 if R reported HH income" ;

. gen w_county = (county == "W") ;

. gen g_county = (county == "G") ;

. gen m_county = (county == "M") ;

. gen age2 = age^2 ;

. /* ASCERTAINING WHAT INCOME NON-RESPONSE IS CORRELATED WITH */
> 
> probit inc_reported gender age age2 fulltime retired own_home water_bill hs_diploma college adults kids native asian black white hawaii other hisp_latino w_county g_county 
> m_county, robust ;

note: hawaii omitted because of collinearity
note: m_county omitted because of collinearity
Iteration 0:   log pseudolikelihood = -852.79672  
Iteration 1:   log pseudolikelihood = -777.99813  
Iteration 2:   log pseudolikelihood = -771.45787  
Iteration 3:   log pseudolikelihood = -771.38741  
Iteration 4:   log pseudolikelihood = -771.38738  

Probit regression                               Number of obs     =      2,511
                                                Wald chi2(19)     =     143.79
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -771.38738               Pseudo R2         =     0.0955

------------------------------------------------------------------------------
             |               Robust
inc_reported |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      gender |   .0536948   .0668658     0.80   0.422    -.0773597    .1847493
         age |  -.1687729   .0253875    -6.65   0.000    -.2185314   -.1190144
        age2 |   .0015697   .0002552     6.15   0.000     .0010694    .0020699
    fulltime |   .0407995   .0853502     0.48   0.633    -.1264838    .2080828
     retired |  -.4616754   .1238363    -3.73   0.000    -.7043901   -.2189607
    own_home |    .000997   .0824127     0.01   0.990     -.160529     .162523
  water_bill |   .0934847   .1012785     0.92   0.356    -.1050175    .2919869
  hs_diploma |  -.2407496   .1808833    -1.33   0.183    -.5952744    .1137751
     college |  -.0083772   .0743834    -0.11   0.910     -.154166    .1374117
      adults |   .0089427   .0329661     0.27   0.786    -.0556697     .073555
        kids |   .0052371   .0341836     0.15   0.878    -.0617616    .0722357
      native |   .7158247   .4246166     1.69   0.092    -.1164086    1.548058
       asian |   .9138552   .3267791     2.80   0.005       .27338     1.55433
       black |   1.224736   .2835958     4.32   0.000     .6688986    1.780574
       white |   1.116944   .2801966     3.99   0.000     .5677693     1.66612
      hawaii |          0  (omitted)
       other |   .9190222   .3214348     2.86   0.004     .2890216    1.549023
 hisp_latino |   .0511061   .1433077     0.36   0.721    -.2297719    .3319841
    w_county |  -.0638187   .0862178    -0.74   0.459    -.2328025    .1051652
    g_county |    .068651   .0937645     0.73   0.464     -.115124     .252426
    m_county |          0  (omitted)
       _cons |   4.588025    .715612     6.41   0.000     3.185451    5.990599
------------------------------------------------------------------------------
Note: 0 failures and 1 success completely determined.

. /* IMPUTING MISSING INCOMES NY COUNTY */
> 
> replace income = . if income == -1 ;
(268 real changes made, 268 to missing)

. poisson income gender age age2 fulltime retired own_home hs_diploma college adults kids black hisp_latino if county == "W", robust ;

Iteration 0:   log pseudolikelihood =  -11689995  
Iteration 1:   log pseudolikelihood =  -11689757  
Iteration 2:   log pseudolikelihood =  -11689757  

Poisson regression                              Number of obs     =        886
                                                Wald chi2(12)     =     496.32
                                                Prob > chi2       =     0.0000
Log pseudolikelihood =  -11689757               Pseudo R2         =     0.3356

------------------------------------------------------------------------------
             |               Robust
      income |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      gender |   .1106014   .0348991     3.17   0.002     .0422004    .1790024
         age |   .0400237   .0090412     4.43   0.000     .0223033    .0577441
        age2 |  -.0003733   .0000943    -3.96   0.000    -.0005581   -.0001884
    fulltime |   .2263164   .0598038     3.78   0.000     .1091031    .3435296
     retired |  -.0274547   .0789778    -0.35   0.728    -.1822484     .127339
    own_home |   .3474403   .0535431     6.49   0.000     .2424977    .4523829
  hs_diploma |    .458858   .3917765     1.17   0.242    -.3090098    1.226726
     college |   .3770748   .0494937     7.62   0.000     .2800689    .4740807
      adults |   .1038317   .0201743     5.15   0.000     .0642909    .1433725
        kids |    .025983   .0165453     1.57   0.116    -.0064451    .0584112
       black |  -.1580234   .0545243    -2.90   0.004    -.2648891   -.0511578
 hisp_latino |  -.0915642   .0710815    -1.29   0.198    -.2308814     .047753
       _cons |   9.174364   .4369897    20.99   0.000      8.31788    10.03085
------------------------------------------------------------------------------

. predict inc1 ;
(option n assumed; predicted number of events)

. replace income = inc1 if income == . & county == "W" ;
(112 real changes made)

. drop inc1 ;

. poisson income gender age age2 fulltime retired own_home hs_diploma college adults kids black hisp_latino if county == "G", robust ;

Iteration 0:   log pseudolikelihood =  -10483174  
Iteration 1:   log pseudolikelihood =  -10482935  
Iteration 2:   log pseudolikelihood =  -10482935  

Poisson regression                              Number of obs     =        729
                                                Wald chi2(12)     =     265.71
                                                Prob > chi2       =     0.0000
Log pseudolikelihood =  -10482935               Pseudo R2         =     0.3127

------------------------------------------------------------------------------
             |               Robust
      income |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      gender |   .1480073    .046279     3.20   0.001     .0573021    .2387125
         age |  -.0019365   .0101433    -0.19   0.849     -.021817    .0179439
        age2 |   .0000275    .000099     0.28   0.781    -.0001665    .0002215
    fulltime |   .4310795   .0806588     5.34   0.000     .2729913    .5891678
     retired |   .1637022   .1037804     1.58   0.115    -.0397036    .3671079
    own_home |   .4559004   .0794862     5.74   0.000     .3001102    .6116905
  hs_diploma |   .2367893   .2822984     0.84   0.402    -.3165055    .7900841
     college |   .3340093   .0572211     5.84   0.000     .2218579    .4461607
      adults |   .1260945   .0264125     4.77   0.000     .0743269    .1778621
        kids |   .0694408   .0236786     2.93   0.003     .0230316      .11585
       black |  -.2183021   .0661043    -3.30   0.001     -.347864   -.0887401
 hisp_latino |  -.1060943   .1270201    -0.84   0.404    -.3550491    .1428605
       _cons |   9.927063   .3566823    27.83   0.000     9.227979    10.62615
------------------------------------------------------------------------------

. predict inc1 ;
(option n assumed; predicted number of events)

. replace income = inc1 if income == . & county == "G" ;
(81 real changes made)

. drop inc1 ;

. poisson income gender age age2 fulltime retired own_home hs_diploma college adults kids black hisp_latino if county == "M", robust ;

Iteration 0:   log pseudolikelihood =   -8866353  
Iteration 1:   log pseudolikelihood = -8865636.2  
Iteration 2:   log pseudolikelihood = -8865635.7  

Poisson regression                              Number of obs     =        628
                                                Wald chi2(12)     =     366.33
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -8865635.7               Pseudo R2         =     0.3482

------------------------------------------------------------------------------
             |               Robust
      income |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      gender |   .0703808   .0445821     1.58   0.114    -.0169985    .1577601
         age |   .0321954   .0096604     3.33   0.001     .0132614    .0511293
        age2 |  -.0003482   .0000997    -3.49   0.000    -.0005436   -.0001528
    fulltime |   .2054343   .0656336     3.13   0.002     .0767948    .3340737
     retired |   .0079346   .1021527     0.08   0.938     -.192281    .2081501
    own_home |   .4870897   .0592269     8.22   0.000     .3710071    .6031724
  hs_diploma |   .4171514   .3491269     1.19   0.232    -.2671247    1.101427
     college |   .4546201   .0652825     6.96   0.000     .3266688    .5825714
      adults |   .0406033   .0249328     1.63   0.103    -.0082641    .0894707
        kids |   .0453392   .0210961     2.15   0.032     .0039917    .0866868
       black |  -.2816241   .0717025    -3.93   0.000    -.4221584   -.1410897
 hisp_latino |  -.1094363   .1239613    -0.88   0.377     -.352396    .1335233
       _cons |   9.466257   .4122647    22.96   0.000     8.658233    10.27428
------------------------------------------------------------------------------

.   predict inc1 ;
(option n assumed; predicted number of events)

. replace income = inc1 if income == . & county == "M" ;
(75 real changes made)

. drop inc1 ;

. drop w_county g_county m_county age2 inc_reported ;

. sum income gender age fulltime retired own_home hs_diploma college adults kids asian black white ;

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      income |      2,511    99130.84    61630.62      10000     225000
      gender |      2,511    .4752197    .4838155          0          1
         age |      2,511    51.14356    16.14859         18         90
    fulltime |      2,511    .5644826    .4808435          0          1
     retired |      2,511    .2393877    .4138101          0          1
-------------+---------------------------------------------------------
    own_home |      2,511     .751213    .4191645          0          1
  hs_diploma |      2,511    .9902641    .0952711          0          1
     college |      2,511    .7237811    .4338343          0          1
      adults |      2,511           2    .8845735          1         10
        kids |      2,511    .5873789      .99405          0         10
-------------+---------------------------------------------------------
       asian |      2,511    .0497099    .2105026          0          1
       black |      2,511    .1574137    .3529555          0          1
       white |      2,511    .7395972    .4254164          0          1

. log close ;
      name:  <unnamed>
       log:  C:\Users\rhhaefen\Dropbox\EPA_WQ_Grant_Survey_Files\Final_Data_Public\log\1-impute.log
  log type:  text
 closed on:  23 Nov 2021, 16:54:49
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
